﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Justin.Stock.Models
{
    internal class HideOnStartupApplicationContext : ApplicationContext
    {
        private Form mainFormInternal;// 构造函数，主窗体被存储在mainFormInternal
        public HideOnStartupApplicationContext(Form mainForm)
        {
            this.mainFormInternal = mainForm;// 当主窗体被关闭时，退出应用程序
        }
        void mainFormInternal_Closed(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}

